# ThreadCommunicationExample.pro

QT       += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = ThreadCommunicationExample
TEMPLATE = app

# 启用C++11特性
CONFIG += c++11

# 源文件
SOURCES += \
    main.cpp \
    mainwindow.cpp \
    producerthread.cpp \
    consumerthread.cpp

# 头文件
HEADERS += \
    mainwindow.h \
    producerthread.h \
    consumerthread.h

# UI文件
FORMS += \
    mainwindow.ui

# 编译选项
QMAKE_CXXFLAGS += -Wall -Wextra

# 调试信息
CONFIG += debug_and_release
CONFIG(debug, debug|release) {
    DEFINES += DEBUG_MODE
}

# 发布版本优化
CONFIG(release, debug|release) {
    DEFINES += QT_NO_DEBUG_OUTPUT
    QMAKE_CXXFLAGS_RELEASE += -O2
}

# 多线程编译（加快编译速度）
win32 {
    QMAKE_CXXFLAGS += -MP
}
